<template>
  <Header class="header">
    <div class="header-top">
      <div class="container">
        <div class="container-left">
          <p>尚品汇欢迎您！</p>
          <p @click="goToLogin">请<a>&nbsp&nbsp登陆</a></p>
          <p><a  href="###" class="register">免费注册</a></p>
        </div>
        <div class="container-right">
          <a href="###">我的订单</a>
          <a href="###">我的购物车</a>
          <a href="###">我的尚品汇</a>
          <a href="###">我的尚品汇会员</a>
          <a href="###">企业采购</a>
          <a href="###">合作招商</a>
          <a href="###">商家后台</a>
        </div>
      </div>
    </div>
    <div class="header-bottom">
      <div  class="header-bottom-left">
        <img src="../../assets/images/logo.png"/>
      </div>
      <div  class="header-bottom-right">
        <input placeholder="请输入搜索内容"/>
        <button @click="search">搜索</button>
      </div>
    </div>
  </Header>
</template>

<script>
export default {
    name:'headers',
    data(){
      return{

      }
    },
    mounted() {

    },
    methods:{
      search(){
          this.$router.push('/search')
      },
      goToLogin(){
        this.$router.push('/login')
      }
    }
}
</script>

<style lang="less">
.header{
  .header-top{
    height: 30px;
    line-height: 30px;
    background-color: #eaeaea;
    .container{
      width: 1200px;
      margin: 0 auto;
      overflow: hidden;
      a{
        text-decoration: none;
        color: #666;
        font-size: 12px;
      }
      a:hover{
        color: #4cb9fc;
      }
      .container-left{
        float: left;
        p{
          float: left;
          font-size: 12px;
          margin-block-start: 0;
          margin-block-end:0;
          margin-right: 10px;
        }
        .register{
          border-left: 1px solid #666;
          padding: 0 5px;
        }
      }
      .container-right{
        float: right;
        a{
          border-right: 1px solid #666;
          padding: 0 6px;
        }
      }
    }
  }
  .header-bottom{
    width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    .header-bottom-left{
      float: left;
      margin-top: 20px;
    }
    .header-bottom-right{
      float: right;
      margin-top: 20px;
      input{
        box-sizing: border-box;
        width: 300px;
        height: 32px;
        border: 2px solid #ea4a36;
        &:focus {
          outline: none;
        }
      }
      button{
        width: 68px;
        height: 32px;
        border: none;
        background-color: #ea4a36;
        color: white;
        cursor: pointer
      }
    }
  }
}



</style>